package com.supor.nfc.lib.common;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * ---------------------------------------------------------------- <br>
 * Copyright (C) 2014-2020, by het, Shenzhen, All rights reserved.  <br>
 * ---------------------------------------------------------------- <br>
 * <p>
 * 描述: Param1 <br>
 * 作者: lei <br>
 * 日期: 2020/9/7 <br>
 */
public class Param1 extends ParamInfo implements Parcelable {
    /**
     * 阶段一火力/温度 W/℃(1bytes)
     */
    public short fireStep1;
    /**
     * 阶段一制作时间 min(2bytes)
     */
    public short timeStep1;
    /**
     * 阶段二火力/温度 W/℃(1bytes)
     */
    public short fireStep2;
    /**
     * 阶段二制作时间 min(2bytes)
     */
    public short timeStep2;
    /**
     * 阶段三火力/温度 W/℃(1bytes)
     */
    public short fireStep3;
    /**
     * 阶段三制作时间 min(2bytes)
     */
    public short timeStep3;
    /**
     * 预约时间 min(2byte)
     */
    public short appointmentTime;
    /**
     * 保温温度 ℃(1byte)
     */
    public short keepTemp;
    /**
     * 保温时间 min(2byte)
     */
    public short keepTime;
    /**
     * 高度(气压) km(1byte)
     */
    public short high;
    /**
     * 环境温度 ℃(1byte)
     */
    public short temp;
    /**
     * 环境湿度 %(1byte)
     */
    public short humi;
    /**
     * 显示亮度 档位等级(1byte)
     */
    public short light;
    /**
     * 声音 档位等级(1byte)
     */
    public short voice;

    public Param1() {
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        super.writeToParcel(dest, flags);
        dest.writeInt(this.fireStep1);
        dest.writeInt(this.timeStep1);
        dest.writeInt(this.fireStep2);
        dest.writeInt(this.timeStep2);
        dest.writeInt(this.fireStep3);
        dest.writeInt(this.timeStep3);
        dest.writeInt(this.appointmentTime);
        dest.writeInt(this.keepTemp);
        dest.writeInt(this.keepTime);
        dest.writeInt(this.high);
        dest.writeInt(this.temp);
        dest.writeInt(this.humi);
        dest.writeInt(this.light);
        dest.writeInt(this.voice);
    }

    protected Param1(Parcel in) {
        super(in);
        this.fireStep1 = (short) in.readInt();
        this.timeStep1 = (short) in.readInt();
        this.fireStep2 = (short) in.readInt();
        this.timeStep2 = (short) in.readInt();
        this.fireStep3 = (short) in.readInt();
        this.timeStep3 = (short) in.readInt();
        this.appointmentTime = (short) in.readInt();
        this.keepTemp = (short) in.readInt();
        this.keepTime = (short) in.readInt();
        this.high = (short) in.readInt();
        this.temp = (short) in.readInt();
        this.humi = (short) in.readInt();
        this.light = (short) in.readInt();
        this.voice = (short) in.readInt();
    }

    public static final Creator<Param1> CREATOR = new Creator<Param1>() {
        @Override
        public Param1 createFromParcel(Parcel source) {
            return new Param1(source);
        }

        @Override
        public Param1[] newArray(int size) {
            return new Param1[size];
        }
    };
}
